package com.cxf.cxfuserdemo.feign;


import com.cxf.cxfuserdemo.configuration.FeignLogConfiguration;
import com.cxf.cxfuserdemo.repository.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "cxf-order-demo",fallback = OrderFeignHystrix.class)
public interface OrderFeign {

    //  feign 接口重要的还是 服务名称 确定ip和port  还有变量路径 接口的名称不重要

    @GetMapping("/order/{orderId}")
    public Order queryOrder(@PathVariable("orderId") String orderId);

    @GetMapping("/order/{orderIdfeign}")
    public Order queryOrderFeign(@PathVariable("orderIdfeign") String orderIdfeign);
}
